//
//  Myplayer.m
//  UI_HLJ_Frame
//
//  Created by  毕宏伟 on 15/7/10.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import "Myplayer.h"
#import <AVFoundation/AVFoundation.h>
@implementation Myplayer

+(Myplayer *)sharePlayer
{
    static Myplayer * myplayer=nil;
    if (myplayer==nil) {
        myplayer=[[Myplayer alloc] init];
    }
    return myplayer;
}
-(void)playMusicWithURL:(NSString *)url
{
    AVPlayerItem *item = [[AVPlayerItem alloc] initWithURL:[NSURL URLWithString:url]];
    [self replaceCurrentItemWithPlayerItem:item];
    [self play];
    
    
}

@end
